using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace QFramework.Adventure
{
    public class YaoShuiController : MonoBehaviour, IInteraction,IIsDone
    {
        public bool isDone { get ; set ; }
        public GameObject SelfObj { get ; set ; }

        private void Start()
        {         
            gameObject.SetActive(!isDone);
            SelfObj = gameObject;
        }

        public void ExitAction()
        {
         
        }

        public void TriggerAction()
        {
            isDone = true;

            AudioKit.PlaySound(GameConfig.Auido_Get);

            var v = RandomUtility.Choose(10,12,15,18);

            MessageCenter<Transform,int>.Send(MessageEnum.Dotween, GameData.playerController.transform,v);
            GameData.playerController.charatcer.currentBlood += v;
            gameObject.SetActive(!isDone);
        }
    }
}